#include<curses.h>
#include"head/screen.h"

void application::init()
{
        initscr();
        keypad(stdscr,TRUE);	//控制键模式
        noecho();		//无回显
        nodelay(stdscr, TRUE);	//无阻塞
        curs_set(0);		//不显示光标
	x = LINES;
	y = COLS;
}

void application::draw_map()
{
	for (int i = 0; i < x-6; i++)
	{
		mvwaddch(i,0,'*');
	}
	for (int i = 0; i < x; i++)
	{
		mvwaddch(i,y-1,'*');
	}
	int k = 0;
	for (int j = 0; j < 2; j++)
	{
		for (int i = 0; i < y, i++)
		{
			mvwaddch(k,i,'*');
		}
		k = y - 1;
	}
}

void application::clear()
{
	::clear();
}

void application::refresh()
{
	::refresh();
}

int application::get_lines()
{
	return x;
}

int application::get_cols()
{
	return y;
}


